<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta name="keywords" content="请替换为您的关键字">
  <meta name="description" content="请替换为您的描述">
  <title>填写信息</title>
  <!-- bower:css -->
  <!-- endbower -->
  <!-- mui picker -->
  <!--<link rel="stylesheet" href="verdors/dcloud-mui/plugin/picker/dist/css/mui.picker.all.css">-->
  <link rel="stylesheet" href="verdors/dcloud-mui/examples/hello-mui/css/mui.picker.css">
  <link rel="stylesheet" href="verdors/dcloud-mui/examples/hello-mui/css/mui.poppicker.css">
  <link rel="stylesheet" href="fonts/iconfont.css">
  <link rel="stylesheet" href="styles/main.css">
</head>
<body class="bg-gray">
  <div class="container">
    <!-- 示意图 -->
    <div class="row">
      <div class="col-xs-12 text-center">
        <img src="imgs/chargingpile.png" alt="">
      </div>
    </div>
    <!-- /示意图 -->

    <!-- 信息录入 -->
    <form class="form-horizontal wl-form">
      <div class="wl-form-group">
        <label class="col-xs-5">充电站名称</label>
        <div class="col-xs-7">
          <input type="text" placeholder="请输入" value="六约充电站" disabled>
        </div>
      </div>

      <div class="wl-form-mutil">
        <div class="wl-form-group">
          <label class="col-xs-5">可预约的充电枪数</label>
          <div class="col-xs-7">
            <input type="text" placeholder="请输入" value="10" disabled>
          </div>
        </div>
        <hr>
        <div class="wl-form-group picker">
          <label class="col-xs-5">选择充电枪</label>
          <div class="col-xs-7">
            <p id='showUserPicker' class="ui-alert">请选择</p>
          </div>
        </div>
        <hr>
        <div class="wl-form-group">
          <label class="col-xs-5">电费(元/度)</label>
          <div class="col-xs-7">
            <input type="text" placeholder="请输入" value="1.61" disabled>
          </div>
        </div>
        <hr>
        <div class="wl-form-group">
          <label class="col-xs-5">服务费(元/度)</label>
          <div class="col-xs-7">
            <input type="text" placeholder="请输入" value="0.45" disabled>
          </div>
        </div>
        <hr>
        <div class="wl-form-group">
          <label class="col-xs-5">预约时间</label>
          <div class="col-xs-7">
            <input type="datetime-local" placeholder="请选择">
          </div>
        </div>
        <hr>
        <div class="wl-form-group">
          <label class="col-xs-5">停车费(元/小时)</label>
          <div class="col-xs-7">
            <input type="text" placeholder="请输入" value="免费停车" disabled>
          </div>
        </div>
        <hr>
        <div class="wl-form-group picker">
          <label class="col-xs-5">请选择金额</label>
          <div class="col-xs-7">
            <p id='selectMoney' class="ui-alert">请选择</p>
          </div>
        </div>
      </div>
    </form>
    <!-- /信息录入 -->
    <div class="row">
      <div class="col-xs-12">
        <span class="pull-right text-muted" data-toggle="modal" data-target="#cost_des"><i class="iconfont if-question"></i>费用说明</span>
      </div>
    </div>

    <div class="row submitBtns">
      <div class="col-xs-6">
        <a href="##" class="btn btn-default btn-lg btn-block">取消</a>
      </div>
      <div class="col-xs-6">
        <a href="##" class="btn btn-primary btn-lg btn-block">扫码</a>
      </div>
    </div>
  </div>

  <!-- 电费表格modal -->
  <div class="modal fade" id="cost_des" tabindex="-1" role="dialog">
    <div class="modal-dialog" role="document">
      <div class="modal-content">
        <div class="modal-header bg-primary">
          <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
          <h4 class="modal-title text-center">费用说明</h4>
        </div>
        <div class="modal-body">
          <table class="table table-striped table-bordered">
            <thead>
              <tr>
                <th>时间段</th>
                <th>电费</th>
                <th>服务费</th>
              </tr>
            </thead>
            <tbody>
              <tr>
                <td>09:00-11:30</td>
                <td>1.06</td>
                <td>0.45</td>
              </tr>
              <tr>
                <td>14:00-16:30</td>
                <td>1.06</td>
                <td>0.45</td>
              </tr>
              <tr>
                <td>19:00-21:00</td>
                <td>1.06</td>
                <td>0.45</td>
              </tr>
              <tr>
                <td>11:30-14:00</td>
                <td>0.70</td>
                <td>0.45</td>
              </tr>
              <tr>
                <td>07:00-09:00</td>
                <td>0.70</td>
                <td>0.45</td>
              </tr>
              <tr>
                <td>16:30-19:00</td>
                <td>0.70</td>
                <td>0.45</td>
              </tr>
              <tr>
                <td>21:00-23:00</td>
                <td>0.7</td>
                <td>0.45</td>
              </tr>
              <tr>
                <td>23:00-24:00</td>
                <td>0.7</td>
                <td>0.45</td>
              </tr>
              <tr>
                <td>00:00-07:00</td>
                <td>0.70</td>
                <td>0.45</td>
              </tr>
            </tbody>
          </table>
          <p class="text-right text-muted">单位：元/度</p>
        </div>
      </div>
    </div>
  </div>
  <!-- /电费表格modal -->

<!-- bower:js -->
<!-- endbower -->
  <script src="verdors/dcloud-mui/examples/hello-mui/js/mui.min.js"></script>
  <script src="verdors/dcloud-mui/examples/hello-mui/js/mui.picker.js"></script>
  <script src="verdors/dcloud-mui/examples/hello-mui/js/mui.poppicker.js"></script>
<script>
  (function($, doc) {
    $.init();
    $.ready(function() {
      /**
       * 获取对象属性的值
       * 主要用于过滤三级联动中，可能出现的最低级的数据不存在的情况，实际开发中需要注意这一点；
       * @param {Object} obj 对象
       * @param {String} param 属性名
       */
      var _getParam = function(obj, param) {
        return obj[param] || '';
      };
      // 选择充电枪
      var userPicker = new $.PopPicker();
      userPicker.setData([{
        text: 'N800216440755003'
      }, {
        text: 'N800216440755043'
      }, {
        text: 'N800216440755064'
      }, {
        text: 'N800216440755852'
      }]);
      var showUserPickerButton = doc.getElementById('showUserPicker');
      var userResult = doc.getElementById('showUserPicker');
      showUserPickerButton.addEventListener('tap', function(event) {
        userPicker.show(function(items) {
          userResult.innerText = items[0].text;
          //返回 false 可以阻止选择框的关闭
          //return false;
        });
      }, false);

      // 选择金额
      var moneyPicker = new $.PopPicker();
      moneyPicker.setData([{
        text: '100'
      }, {
        text: '200'
      }, {
        text: '300'
      }, {
        text: '500'
      }]);
      var selectMoneyButton = doc.getElementById('selectMoney');
      var moneyResult = doc.getElementById('selectMoney');
      selectMoneyButton.addEventListener('tap', function(event) {
        moneyPicker.show(function(items) {
          moneyResult.innerText = items[0].text;
          //返回 false 可以阻止选择框的关闭
          //return false;
        });
      }, false);
    });
  })(mui, document);
</script>
</body>
</html>
